package com.bd.scm.dao.mapper.leave;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bd.scm.domain.models.leave.LeaveTypeDefinition;

public interface LeaveTypeDefinitionMapper {
    /**
     * 获取假类列表
     * @param page,leaveTypeDefinition
     * @return
     */
    IPage<LeaveTypeDefinition> getLeaveTypeList(Page<LeaveTypeDefinition> page, LeaveTypeDefinition leaveTypeDefinition);

    /**
     * 查询最大编号
     * @param leaveTypeDefinition
     * @return
     */
    int getMaxBh(LeaveTypeDefinition leaveTypeDefinition);
    /**
     * 查询编号是否存在
     * @param leaveTypeDefinition
     * @return
     */
    int isExistByBh(LeaveTypeDefinition leaveTypeDefinition);
    /**
     * 添加假类
     * @param leaveTypeDefinition,clientIp
     * @return
     */
    int addLeaveType(LeaveTypeDefinition leaveTypeDefinition);

    /**
     * 添加bd_day_user_jial字段  假类编号
     * @param leaveTypeDefinition
     */
    void addBdDayUserJialColumn(LeaveTypeDefinition leaveTypeDefinition);

    /**
     * 新增添加日志
     * @param leaveTypeDefinition
     * @return
     */
    int addLogByAdd(LeaveTypeDefinition leaveTypeDefinition);
    String getNo(LeaveTypeDefinition leaveTypeDefinition);
    int getNoIsExist(LeaveTypeDefinition leaveTypeDefinition);

    /**
     * 修改假类
     * @param leaveTypeDefinition,clientIp
     * @return
     */
    int updateLeaveType(LeaveTypeDefinition leaveTypeDefinition);

    /**
     * 修改添加日志
     * @param leaveTypeDefinition
     * @return
     */
    int addLog(LeaveTypeDefinition leaveTypeDefinition);

    /**
     * 删除假类
     * @param leaveTypeDefinition,clientIp
     * @return
     */
    int deleteLeaveType(LeaveTypeDefinition leaveTypeDefinition);

    /**
     * 删除添加日志
     * @param leaveTypeDefinition
     * @return
     */
    int addLogByDelete(LeaveTypeDefinition leaveTypeDefinition);

    /**
     * 获取状态
     * @param leaveTypeDefinition
     * @return
     */
    int getStatus(LeaveTypeDefinition leaveTypeDefinition);

    /**
     * 启用
     * @param leaveTypeDefinition
     * @return
     */
    int updateStatus(LeaveTypeDefinition leaveTypeDefinition);

    /**
     * 禁用
     * @param leaveTypeDefinition
     * @return
     */
    int updateStatus2(LeaveTypeDefinition leaveTypeDefinition);
}
